Imports System.IO
Public Class frmPRINT
    Public BillCode As Integer = 0
    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
        Me.Close()
    End Sub

    Private Sub btnPrintOrder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintOrder.Click
        If BillCode > 0 Then
            Dim oPrint As New oPrint
            If File.Exists(PublicVariable.OrderPrintFilePath) Then
                oPrint.PrintSlip(BillCode, PublicVariable.ShowPrintPreview, PublicVariable.OrderPrintFilePath, PublicVariable.OrderPrintName, PublicVariable.OrderPrintSlipCount)
            End If
        End If
    End Sub

    Private Sub btnPrintReceipt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintReceipt.Click
        If BillCode > 0 Then
            Dim oPrint As New oPrint
            If File.Exists(PublicVariable.ReceiptPrintFilePath) Then
                oPrint.PrintSlip(BillCode, PublicVariable.ShowPrintPreview, PublicVariable.ReceiptPrintFilePath, PublicVariable.ReceiptPrintName, PublicVariable.ReceiptPrintSlipCount)
            End If
        End If
    End Sub

    Private Sub btnPrintKitchen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintKitchen.Click
        If BillCode > 0 Then
            Dim oPrint As New oPrint
            If File.Exists(PublicVariable.KitchenPrintFilePath) Then
                oPrint.Print_KITCHEN(BillCode, PublicVariable.ShowPrintPreview, PublicVariable.KitchenPrintFilePath, PublicVariable.KitchenPrintName)
            End If
        End If
    End Sub

    Private Sub frmPRINT_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Try
            GC.Collect()
            Me.Dispose()
        Catch ex As Exception

        End Try
    End Sub

    Private Sub frmPRINT_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        PublicFunction.NewFormLoad(Me)
    End Sub
End Class